package com.jie.deletefile.design;

import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.Bundle;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ListView;

import com.jie.deletefile.R;

import java.util.ArrayList;
import java.util.List;

public class CollToolBarActivity extends AppCompatActivity {

    private Toolbar c_tl;
    private ListView t_lv;
    private View view;
    private List<View> listview;
    private VpAdapter adapt;
    private CollapsingToolbarLayout ctb;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_coll_tool_bar);
        initView();

    }

    private void initView() {
        c_tl = (Toolbar) findViewById(R.id.c_tl);
//        c_tl.setTitle();
//        c_tl.setSubtitleTextColor(Color.WHITE);
        ctb = (CollapsingToolbarLayout) findViewById(R.id.ctb);
        ctb.setTitle("this is titleBar");
        ctb.setCollapsedTitleTextColor(Color.WHITE);
        ctb.setExpandedTitleTextColor(ColorStateList.valueOf(Color.RED));
    }

    private List<String> getdata() {
        List<String> data = new ArrayList<>();
        for (int i = 0; i < 30; i++) {
            data.add("条目" + i);
        }
        return data;
    }

}
